package com.estronger.shopmanage.ui.aftermarket.utils;

import android.content.Context;
import android.support.v4.app.Fragment;
import com.estronger.shopmanage.ui.aftermarket.fragment.AftermarketAllFragment;
import com.estronger.shopmanage.ui.aftermarket.fragment.AftermarketFirstFragment;
import com.estronger.shopmanage.ui.aftermarket.fragment.AftermarketTwoFragment;

import java.util.ArrayList;
import java.util.List;

public class AftermarketUitl {

    List<ViewBean> viewBeanList = new ArrayList<>();

    Context mContext;

    public AftermarketUitl(Context context){
        this.mContext = context;
        initViewModel();
    }

    void initViewModel(){
        viewBeanList.add(new ViewBean("预约确认(0)",new AftermarketFirstFragment()));
        viewBeanList.add(new ViewBean("完工确认(0)",new AftermarketTwoFragment()));
        viewBeanList.add(new ViewBean("全部",new AftermarketAllFragment()));
    }

    public List<ViewBean> getViewBeanList() {
        return viewBeanList;
    }

    public class ViewBean{

        Fragment fragment;
        String title;

        public ViewBean(String title, android.support.v4.app.Fragment fragment){
            this.title = title;
            this.fragment = fragment;
        }

        public void setFragment(Fragment fragment) {
            this.fragment = fragment;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public Fragment getFragment() {
            return fragment;
        }

        public String getTitle() {
            return title;
        }
    }
}
